package com.gin.kotlin.no_gay_alliance.model

import android.os.Parcelable
import com.gin.nga.response.item.ItemTypeInfo
import kotlinx.parcelize.Parcelize

/**
 * 道具类型信息
 * @property filename 文件名
 * @property name 名称
 * @property description 描述
 * @property permissionToBuy 购买要求
 * @property subTypeId 类型ID
 * @property url 地址
 * @constructor
 */
@Parcelize
data class ItemTypeModel(
    var filename: String? = null,
    var name: String? = null,
    var description: String? = null,
    var permissionToBuy: String? = null,
    var subTypeId: Int? = null,
    var url: String? = null,
) : Parcelable {
    constructor(itemTypeInfo: ItemTypeInfo) : this(
        filename = itemTypeInfo.filename,
        name = itemTypeInfo.name,
        description = itemTypeInfo.description,
        permissionToBuy = itemTypeInfo.permissionToBuy,
        subTypeId = itemTypeInfo.getSubTypeId(),
        url = itemTypeInfo.getMedalUrl(),
    )
}
